import * as ts from 'typescript';
import fs from "fs"
export default function(program: ts.Program, pluginOptions: {}) {
	fs.rmdirSync(`${program.getCompilerOptions().outDir}`, { recursive: true });
	return (ctx: ts.TransformationContext) => {
		return (sourceFile: ts.SourceFile) => {
			function visitor(node: ts.Node): ts.Node {
				return ts.visitEachChild(node, visitor, ctx);
			}
			return ts.visitEachChild(sourceFile, visitor, ctx);
		};
	};
}

